/**
 * @Author: YCKOKO
 * @Date: 2023-05-17
 * @Time:18:59
 * @Description:
 */
public class demo1 {
    public int addAB(int A, int B) {
        // write code here
        if (B == 0) {
            return A;
        }
        int carry = 0;
        while (B != 0) {
            carry = (A & B) << 1;
            A = A ^ B;
            B = carry;
        }
        return A;
    }
}
